home *** CD-ROM | disk | FTP | other *** search
- property tracking, txvel, tyvel
-
- on mouseDown me
- set the tracking of me to 1
- end
-
- on mouseWithin me
- if the tracking of me then
- setVelocity(me)
- end if
- end
-
- on mouseUpOutSide me
- set the tracking of me to 0
- throw(me)
- end
-
- on mouseUp me
- set the tracking of me to 0
- throw(me)
- end
-
- on throw me
- set s to the spriteNum of me
- set the enable of sprite(s) to 1
- set the xvel of sprite(s) to the txvel of me
- set the yvel of sprite(s) to the tyvel of me
- puppetSprite(the spriteNum of me, 1)
- end
-
- on setVelocity me
- set s to the spriteNum of me
- set currx to the locH of sprite s
- set curry to the locV of sprite s
- set the txvel of me to currx - the oldxpos of sprite(s)
- set the tyvel of me to curry - the oldypos of sprite(s)
- set the oldxpos of sprite(s) to currx
- set the oldypos of sprite(s) to curry
- set the xpos of sprite(s) to currx
- set the ypos of sprite(s) to curry
- end
-